package vista;
import vista.Panel;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Image;
import java.awt.event.ActionListener;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class FramePrincipal extends javax.swing.JFrame {

	private JMenuBar jMenu;
	private JMenu MReporte, MOrdenar, MListados;
	private JMenuItem MFactCompra;
	private JMenuItem MIngrediente;
	private JRadioButtonMenuItem PorMonto, PorCantidad;
	private JRadioButtonMenuItem IngDescendente, IngAscendente;
	private JMenuItem Salir;
	private JMenuItem MOrdenP;
	private JMenuItem MProducto;
	private JMenuItem MCategoria;
	private JMenuItem MProveedor;
	private JMenuItem MCliente;
	private JMenuItem IngreUsados;
	private JMenu MSalir;
	private JMenu MTransaccion;
	private JMenu MRegistrar;
	

	public FramePrincipal() {
		super();
		initGUI();
		Panel pan = new Panel("/imagenes/fondoN.jpg", this.getWidth(), this.getHeight());
		this.add(pan, BorderLayout.CENTER);
		pan.setPreferredSize(new java.awt.Dimension(888, 615));
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setName("Pantalla Principal");
			this.setTitle("Pantalla Principal");
			{
				jMenu = new JMenuBar();
				setJMenuBar(jMenu);
				{
					MRegistrar = new JMenu();
					getContentPane().setBackground(Color.white);
					jMenu.add(MRegistrar);
					MRegistrar.setText("Registrar");
					MRegistrar.setFont(new java.awt.Font("Purisa",1,12));
					{
						MCategoria = new JMenuItem();
						MRegistrar.add(MCategoria);
						MCategoria.setText("Categoria");
						MCategoria.setFont(new java.awt.Font("Purisa",0,12));

					}
					{
						MProducto = new JMenuItem();
						MRegistrar.add(MProducto);
						MProducto.setText("Producto");
						MProducto.setFont(new java.awt.Font("Purisa",0,12));
					}
					{
						MCliente = new JMenuItem();
						MRegistrar.add(MCliente);
						MCliente.setText("Cliente");
						MCliente.setFont(new java.awt.Font("Purisa",0,12));
					}
					{
						MProveedor = new JMenuItem();
						MRegistrar.add(MProveedor);
						MProveedor.setText("Proveedor");
						MProveedor.setFont(new java.awt.Font("Purisa",0,12));
					}
					{
						MIngrediente = new JMenuItem();
						MRegistrar.add(MIngrediente);
						MIngrediente.setText("Ingrediente");
						MIngrediente.setFont(new java.awt.Font("Purisa",0,12));
					}
				}
				{
					MTransaccion = new JMenu();
					jMenu.add(MTransaccion);
					MTransaccion.setText("Transaccion");
					MTransaccion.setFont(new java.awt.Font("Purisa",1,12));
					{
						MOrdenP = new JMenuItem();
						MTransaccion.add(MOrdenP);
						MOrdenP.setText("Orden de Pedido");
						MOrdenP.setFont(new java.awt.Font("Purisa",0,12));
					}
					{
						MFactCompra = new JMenuItem();
						MTransaccion.add(MFactCompra);
						MFactCompra.setText("Registrar Compra");
						MFactCompra.setFont(new java.awt.Font("Purisa",0,12));
					}
				}
				{
					MReporte = new JMenu();
					jMenu.add(MReporte);
					MReporte.setText("Reportes");
					MReporte.setFont(new java.awt.Font("Purisa",1,12));
					{
						MListados = new JMenu();
						MReporte.add(MListados);
						MListados.setText("Listado de Venta");
						MListados.setFont(new java.awt.Font("Purisa",0,12));
						{
							PorCantidad = new JRadioButtonMenuItem();
							MListados.add(PorCantidad);
							PorCantidad.setText("Cantidad");
							PorCantidad.setFont(new java.awt.Font("Purisa",0,12));
						}
						{
							PorMonto = new JRadioButtonMenuItem();
							MListados.add(PorMonto);
							PorMonto.setText("Monto");
							PorMonto.setFont(new java.awt.Font("Purisa",0,12));
						}
					}
					{
						IngreUsados = new JMenuItem();
						MReporte.add(IngreUsados);
						IngreUsados.setText("Ingredientes mas Usados");
						IngreUsados.setFont(new java.awt.Font("Purisa",0,12));
					}
				}
				{
					MSalir = new JMenu();
					jMenu.add(MSalir);
					MSalir.setText("Salir");
					MSalir.setFont(new java.awt.Font("Purisa",1,12));
					{
						Salir = new JMenuItem();
						MSalir.add(Salir);
						Salir.setText("Salir");
						Salir.setFont(new java.awt.Font("Purisa",0,12));
					}
				}
			}
			pack();
			this.setSize(889, 678);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void addListener(ActionListener actionListener) {
		this.MCategoria.addActionListener(actionListener);
		this.MProducto.addActionListener(actionListener);
		this.MCliente.addActionListener(actionListener);
		this.MProveedor.addActionListener(actionListener);
		this.MIngrediente.addActionListener(actionListener);
		this.MOrdenP.addActionListener(actionListener);
		this.MFactCompra.addActionListener(actionListener);
		this.PorCantidad.addActionListener(actionListener);
		this.PorMonto.addActionListener(actionListener);
		this.IngreUsados.addActionListener(actionListener);
		this.Salir.addActionListener(actionListener);
	}
	
	public JMenuBar getjMenu() {
		return jMenu;
	}

	public void setjMenu(JMenuBar jMenu) {
		this.jMenu = jMenu;
	}

	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	

}
